package com.lmabbe.common.datasources.config;

import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
import com.lmabbe.common.datasources.p6spy.P6SpyLogger;
import com.p6spy.engine.spy.appender.MessageFormattingStrategy;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author lmabbe
 * @data 2021/3/22 22:15
 */
@Data
@ConfigurationProperties(prefix = "lmabbe.datasources")
public class DataSourcesProperties {

    private boolean enable = true;

    private boolean enablePage = true;

    private boolean useHuToolSnowflakeId = true;

    private Integer terminalId = 1;

    private Integer centreId = 1;

    private Class<? extends IdentifierGenerator> idGenerateClass;

    private boolean useP6spy = true;

    /**
     * 是否是平台服务
     */
    private Boolean isPlatform = true;

    /**
     * 是否是核心服务
     */
    private Boolean isCore = false;

    private Boolean isSyncStructure = true;

    private Class<? extends MessageFormattingStrategy> p6spyLogClass = P6SpyLogger.class;

}
